package com.dlc.felear.xiaoensale.entity;

import android.support.annotation.NonNull;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

import java.io.Serializable;

@DatabaseTable(tableName = "t_operator")
public class Operator implements Comparable<Operator> {
    @DatabaseField(generatedId = true)
    private int id;
    @DatabaseField(columnName = "num")
    private int num;
    @DatabaseField(columnName = "name")
    private String name;
    @DatabaseField(columnName = "value")
    private int value;
    @DatabaseField(columnName = "delay_time")
    private int delayTime;
    @DatabaseField(columnName = "m_id")
    private String mId;
    @DatabaseField
    private byte cmd;
    private byte[] cmdData;
    @DatabaseField
    private String cmdString;
    @DatabaseField
    private int serial;
    @DatabaseField
    private int value1;
    private long currentTimeStamp;
    private boolean isRun;
    private int type;
    private boolean select;

    public Operator(int num, String name, String mId, int type,int value,  int value1,int delayTime ) {
        this.num = num;
        this.name = name;
        this.value = value;
        this.delayTime = delayTime;
        this.mId = mId;
        this.value1 = value1;
        this.type = type;
    }



    public boolean isSelect() {
        return select;
    }

    public void setSelect(boolean select) {
        this.select = select;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public byte[] getCmdData() {
        return cmdData;
    }

    public void setCmdData(byte[] cmdData) {
        this.cmdData = cmdData;
    }

    public boolean isRun() {
        return isRun;
    }

    public void setRun(boolean run) {
        isRun = run;
    }

    public long getCurrentTimeStamp() {
        return currentTimeStamp;
    }

    public void setCurrentTimeStamp(long currentTimeStamp) {
        this.currentTimeStamp = currentTimeStamp;
    }

    public String getCmdString() {
        return cmdString;
    }

    public void setCmdString(String cmdString) {
        this.cmdString = cmdString;
    }

    public int getSerial() {
        return serial;
    }

    public void setSerial(int serial) {
        this.serial = serial;
    }

    public byte getCmd() {
        return cmd;
    }

    public void setCmd(byte cmd) {
        this.cmd = cmd;
    }

    public Operator() {
        name="请选择";
    }
    public Operator(int num) {
        this();
        this.num=num;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getValue() {
        return value;
    }

    public void setValue(int value) {
        this.value = value;
    }

    public int getDelayTime() {
        return delayTime;
    }

    public void setDelayTime(int delayTime) {
        this.delayTime = delayTime;
    }

    public String getmId() {
        return mId;
    }

    public void setmId(String mId) {
        this.mId = mId;
    }

    public int getValue1() {
        return value1;
    }

    public void setValue1(int value1) {
        this.value1 = value1;
    }

    @Override
    public int compareTo(@NonNull Operator o) {
        return this.getNum()-o.getNum();
    }
}
